mysql select user auth plugins

select user, plugin from mysql.user;

+------------------+-----------------------+
| user             | plugin                |
+------------------+-----------------------+
| root             | mysql_native_password |
| mysql.infoschema | caching_sha2_password |
| mysql.session    | caching_sha2_password |
| mysql.sys        | caching_sha2_password |
| root             | mysql_native_password |
+------------------+-----------------------+

Downgrade composer to use v1

composer self-update --1

mysql 8 w php <8

php can’t connect using the default auth (caching_sha2_password) so it needs to be set to mysql_native_password

In mysql conf file (depends on distro), add/uncomment:

[mysqld]
default_authentication_plugin= mysql_native_password

This may be in the root conf, or a specific file included by the !includedir directive

mysql 8 w php7 and laravel 5.5.19 (<…41)

Need to add the following to the mysql config within the database.php config file:

mode => [
'ONLY_FULL_GROUP_BY',
'STRICT_TRANS_TABLES',
'NO_ZERO_IN_DATE',
'NO_ZERO_DATE',
'ERROR_FOR_DIVISION_BY_ZERO',
'NO_ENGINE_SUBSTITUTION',
]

In my exerience with docker, this didn’t work and first load of the site didn’t work (connection refused). Then removing, save/reload, re-add, save/reload worked

Laravel 5.5 With Docker

Helpful Docker Shits

General Docker Info

General Idea

Create docker images for each isolated component of the app service (separation of concerns, scalability). Via docker-compose file, these will be connected via a network. Then through configs, have them talk to each other in the necessary ways.

Further Reading

Docker Commands

Run the compose/build docker compose up --build -d
docker ps
docker exec -it <container_id> bash

END

After spending two days in docker surrounding a legacy application, figuring out wonky details that related to complex docker stuff and complex container/configuration stuff became less of a priority. Up and running with minimum necessary to install, run, edit and push changes for dev environment, knowing this has a dedicated prod environment.